<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>on绑定</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            background: rgba(255, 192, 203, 0.36);
        }

        p {
            width: 40px;
        }
    </style>
    <script src="../../jquery-js/jquery.js"></script>
    <script>
        $(function () {
            $('input').on('click', function () {
                $('<p style="width:150px;">我是一个p标签</p>').appendTo('div');
            });

            $('p').on('mouseenter', function () {
                alert('哈哈哈');
            });

            $('div').on('click mouseenter','p',function () {
               alert('ppppp');
            });

            $('p').off('mouseenter');

            // $('div').on('mouseenter',function () {
            //     alert('hhhhhhhhhhhh');
            // });

            $('div').trigger('mouseenter');
        })
    </script>
</head>
<body>
<input type="button" value="添加">
<div>
    <p>111</p>
    <p>222</p>
    <p>333</p>
    <p>444</p>
</div>
</body>
</html>